import Router from 'koa-router';
const router = new Router();

import agent from './agent';
import fans from './fans';
import login from './login';
import orderDetailList from './orderDetailList';
import stuff from './stuff';
import account from './account';
import orderManage from './orderManage';
import clientManage from './clientManage';

router.prefix('/api/agency');

router.use('/clientManage', clientManage.routes(), clientManage.allowedMethods());
router.use('/agent', agent.routes(), agent.allowedMethods());
router.use('/fans', fans.routes(), fans.allowedMethods());
router.use('/login', login.routes(), login.allowedMethods());

router.use('/agent/orderDetailsList', orderDetailList.routes(), orderDetailList.allowedMethods());

router.use('/agent/stuff', stuff.routes(), stuff.allowedMethods());

router.use('/account', account.routes(), account.allowedMethods()); // 我的账户

router.use('/orderManage', orderManage.routes(), orderManage.allowedMethods()); // 我的账户

export default function(app) {
  app.use(router.routes(), router.allowedMethods());
}
